<?php 

class Alcance_Model_DbTable_Alcanse extends Zend_Db_Table_Abstract {

    protected $_name = 'alcanse';

    public function add($data) {
        $this->insert($data);
    }

    public function edit($data, $idalcance) {
        $this->update($data, 'id = ' . (int) $idalcance);
    }

    public function remove($idalcance) {
        $this->delete('id = ' . (int) $idalcance);
    }

    public function view() {
        return $this->fetchAll();
    }

    public function getCombo() {
        $select = $this->_db->select()
                ->from($this->_name, array('key' => 'id', 'value' => 'title'));
        $result = $this->getAdapter()->fetchAll($select);
        return $result;
    }

}
